extends Area2D

@onready var collision_polygon_2d: CollisionPolygon2D = $CollisionPolygon2D

func _ready() -> void:
	body_entered.connect(on_body_entered,CONNECT_ONE_SHOT)


func on_body_entered(body: Player) -> void:
	body.die()


func move_up() -> void:
	var tween = create_tween()
	tween.tween_property(self,"position",position + Vector2.UP.rotated(rotation)*60,.3)

func move_down() -> void:
	var tween = create_tween()
	tween.tween_property(self,"position",position - Vector2.UP.rotated(rotation)*60,.3)
